//
//  LBXLordKelvinFilter.mm
//  OpenGLGame
//
//  Created by Nguyen Cong Huy on 4/5/13.
//  Copyright (c) 2013 UIT. All rights reserved.
//

#include "LBXLordKelvinFilter.h"
#include "LBToneMapFilter.h"
#include "LBSharpenFilter.h"
#include "LBUtils.h"

LBXLordKelvinFilter::LBXLordKelvinFilter(){
    toneMap = new LBToneMapFilter();
    
    sharpen = new LBSharpenFilter();
    sharpen->setSharpness(0.2);
    
    toneMap->addTarget(sharpen);
    firstFilter = toneMap;
}

LBXLordKelvinFilter::~LBXLordKelvinFilter(){
    outputTexture = 0;
    DELETE_SAFELY(toneMap);
    DELETE_SAFELY(sharpen);
}

void LBXLordKelvinFilter::setToneData(unsigned char* toneData){
    toneMap->setToneData(toneData);
}